// Package domain 放置领域对象
package domain

import "time"

type User struct {
	Id       int64     `json:"id"`
	Email    string    `json:"email"`
	Password string    `json:"password"`
	Nickname string    `json:"nickname"`
	Birthday time.Time `json:"birthday"`
	AboutMe  string    `json:"about_me"`
	// UTC 0 的时区
	Ctime time.Time `json:"ctime"`
	//Addr     Address
}

//type Address struct {
//	Province string `json:"province"`
//	Region   string `json:"region"`
//}

func (u User) ValidateEmail() bool {
	// 在这里用正则表达式校验
	//return u.Email
	return u.Email != "" && u.Password != ""
}
